### 2. Instrument your application
    <Tabs>
      <Tab title="SDK">
        **For direct integration into your Python applications:**
        
        <Tabs>
          <Tab title="Function Arguments">
          ```python
          import openlit

          openlit.init(
            otlp_endpoint="YOUR_GRAFANA_OTEL_GATEWAY_URL", 
            otlp_headers="YOUR_GRAFANA_OTEL_GATEWAY_AUTH"
          )
          ```

          Replace:
          1. `YOUR_GRAFANA_OTEL_GATEWAY_URL` with the `OTEL_EXPORTER_OTLP_ENDPOINT` value you copied in Step 1.
             * Example: `https://otlp-gateway-<zone>.grafana.net/otlp`
          1. `YOUR_GRAFANA_OTEL_GATEWAY_AUTH` with the `OTEL_EXPORTER_OTLP_HEADERS` value you copied in Step 1.
             * Example: `Authorization=Basic%20<base64 encoded Instance ID and API Token>`
          </Tab>
          
          <Tab title="Environment Variables">
          ```python
          import openlit

          openlit.init()
          ```

          Set these environment variables:
          ```shell
          export OTEL_EXPORTER_OTLP_ENDPOINT="YOUR_GRAFANA_OTEL_GATEWAY_URL"
          export OTEL_EXPORTER_OTLP_HEADERS="YOUR_GRAFANA_OTEL_GATEWAY_AUTH"
          ```

          Replace:
          1. `YOUR_GRAFANA_OTEL_GATEWAY_URL` with the `OTEL_EXPORTER_OTLP_ENDPOINT` value you copied in Step 1.
             * Example: `https://otlp-gateway-<zone>.grafana.net/otlp`
          1. `YOUR_GRAFANA_OTEL_GATEWAY_AUTH` with the `OTEL_EXPORTER_OTLP_HEADERS` value you copied in Step 1.
             * Example: `Authorization=Basic%20<base64 encoded Instance ID and API Token>`
          </Tab>
        </Tabs>

        Refer to the OpenLIT [Python SDK repository](https://github.com/openlit/openlit/tree/main/sdk/python) for more advanced configurations and use cases.
      </Tab>
      
      <Tab title="CLI">
        **For zero-code auto-instrumentation via command line:**
        
        <Tabs>
          <Tab title="CLI Arguments">
          ```shell
          # Using CLI arguments
          openlit-instrument \
            --otlp-endpoint "YOUR_GRAFANA_OTEL_GATEWAY_URL" \
            --otlp-headers "YOUR_GRAFANA_OTEL_GATEWAY_AUTH" \
            --service-name "my-ai-service" \
            --deployment-environment "production" \
            python app.py
          ```
          
          Replace:
          1. `YOUR_GRAFANA_OTEL_GATEWAY_URL` with the `OTEL_EXPORTER_OTLP_ENDPOINT` value you copied in Step 1.
             * Example: `https://otlp-gateway-<zone>.grafana.net/otlp`
          1. `YOUR_GRAFANA_OTEL_GATEWAY_AUTH` with the `OTEL_EXPORTER_OTLP_HEADERS` value you copied in Step 1.
             * Example: `Authorization=Basic%20<base64 encoded Instance ID and API Token>`
          </Tab>
          
          <Tab title="Environment Variables">
          ```shell
          # Set environment variables (takes precedence over CLI args)
          export OTEL_EXPORTER_OTLP_ENDPOINT="YOUR_GRAFANA_OTEL_GATEWAY_URL"
          export OTEL_EXPORTER_OTLP_HEADERS="YOUR_GRAFANA_OTEL_GATEWAY_AUTH"
          export OTEL_SERVICE_NAME="my-ai-service"
          export OTEL_DEPLOYMENT_ENVIRONMENT="production"
          
          # Run your application
          openlit-instrument python app.py
          ```
          
          Replace:
          1. `YOUR_GRAFANA_OTEL_GATEWAY_URL` with the `OTEL_EXPORTER_OTLP_ENDPOINT` value you copied in Step 1.
             * Example: `https://otlp-gateway-<zone>.grafana.net/otlp`
          1. `YOUR_GRAFANA_OTEL_GATEWAY_AUTH` with the `OTEL_EXPORTER_OTLP_HEADERS` value you copied in Step 1.
             * Example: `Authorization=Basic%20<base64 encoded Instance ID and API Token>`
          </Tab>
        </Tabs>

        Refer to the OpenLIT [Python SDK repository](https://github.com/openlit/openlit/tree/main/sdk/python) for more advanced configurations and use cases.
      </Tab>
    </Tabs>
